Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ebpf): robustify probe unloading in case of ebpf #442

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Conversation

iurly
Copy link
Contributor

@iurly iurly commented Mar 21, 2024

there might be situations which we have a
downloaded kernel module loaded in the system.
In that case, modprobe -r will fail since the module is not known to the system.
Also, the service unit should normally remove
it autonomously, so the explicit removal should
only be taken as the last resort.

So put in place the two following changes:

  1. After stopping the unit, check if the module is still present -- do nothing if not
  2. Try with modprobe -r first and if that fails, try with rmmod

@iurly iurly requested a review from aroberts87 March 21, 2024 14:32
there might be situations which we have a
downloaded kernel module loaded in the system.
In that case, modprobe -r will fail since the module
is not known to the system.
Also, the service unit should normally remove
it autonomously, so the explicit removal should
only be taken as the last resort.

So put in place the two following changes:
1. After stopping the unit, check if the
   module is still present -- do nothing if not
2. Try with modprobe -r first and if that fails,
   try with rmmod
@iurly iurly force-pushed the robustify_rmmod branch from b48d445 to 76edef1 Compare March 21, 2024 15:33
@iurly iurly enabled auto-merge (squash) March 21, 2024 15:34
@iurly iurly merged commit eeefcda into main Mar 21, 2024
8 checks passed
@iurly iurly deleted the robustify_rmmod branch March 21, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants